package com.jrx.anytxn.transaction.job.customer.step;

import com.jrx.anytxn.customer.entity.CmCustomerExtInfo;
import com.jrx.anytxn.customer.mapper.ext.ExtCmCustomerExtInfoMapper;
import com.jrx.anytxn.param.entity.TlFilePaymentLog;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @comment: 产品激活 Writer
 * @author: liuzb
 * @date: 2023/05/03 10:00
 */
@Service
public class ActiveProductWriter implements ItemWriter<CmCustomerExtInfo> {

    @Resource
    ExtCmCustomerExtInfoMapper extCmCustomerExtInfoMapper;

    @Override
    public void write(List<? extends CmCustomerExtInfo> list) throws Exception {
        for (CmCustomerExtInfo item : list) {
            extCmCustomerExtInfoMapper.updateProductActiveFlag(item);
        }
    }

}
